package goulu.bloggy.com.Models;

import java.io.Serializable;
import java.util.GregorianCalendar;

public class Post implements Serializable
{

	private static final long serialVersionUID = 5569398119964302436L;
	
	private int id; //mysql database sets this, only get it from db
	private int userid;
	private String title;
	private String content;
	private String mood;
	private GregorianCalendar creationDate;
	private boolean published;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getUserid() {
		return userid;
	}
	public void setUserid(int userid) {
		this.userid = userid;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getMood() {
		return mood;
	}
	public void setMood(String mood) {
		this.mood = mood;
	}
	public GregorianCalendar getCreationDate() {
		return creationDate;
	}
	public void setCreationDate(GregorianCalendar creationDate) {
		this.creationDate = creationDate;
	}
	public boolean isPublished() {
		return published;
	}
	public void setPublished(boolean published) {
		this.published = published;
	}
	@Override
	public String toString() 
	{
		String data = "postid = " + id + " posttitle = " + title + " postcontent = " + content;
		return data;
	}
	
}
